.class Lframent/FramentMerchant$2;
.super Ljava/lang/Thread;
.source "FramentMerchant.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lframent/FramentMerchant;->getShopSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lframent/FramentMerchant;


# direct methods
.method constructor <init>(Lframent/FramentMerchant;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    .line 258
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 13

    .prologue
    const/4 v12, 0x2

    .line 260
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 262
    new-instance v4, Landroid/os/Message;

    invoke-direct {v4}, Landroid/os/Message;-><init>()V

    .line 264
    .local v4, "msg":Landroid/os/Message;
    new-instance v9, Ljava/lang/StringBuilder;

    iget-object v10, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v10, v10, Lframent/FramentMerchant;->m:Lmyapp/MyApp;

    invoke-virtual {v10}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v10

    invoke-static {v10}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v10

    invoke-direct {v9, v10}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v10, "/index.php?ctrl=app&action=getShopRealInfo&shopid="

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    iget-object v10, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v10, v10, Lframent/FramentMerchant;->shopid:Ljava/lang/String;

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v10, "&datatype=json"

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    .line 266
    .local v8, "url":Ljava/lang/String;
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v9, v9, Lframent/FramentMerchant;->m:Lmyapp/MyApp;

    invoke-static {v8, v9}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v7

    .line 267
    .local v7, "str":Ljava/lang/String;
    const-string v9, "str----------------"

    invoke-static {v9, v8}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 270
    :try_start_0
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3, v7}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 271
    .local v3, "json":Lorg/json/JSONObject;
    const-string v9, "error"

    invoke-virtual {v3, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    const-string v10, "true"

    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_0

    .line 272
    const-string v9, "msg"

    invoke-virtual {v3, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    iput-object v9, v4, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 273
    const/4 v9, 0x1

    iput v9, v4, Landroid/os/Message;->arg1:I

    .line 274
    sget-object v9, Lframent/FramentMerchant;->h:Landroid/os/Handler;

    invoke-virtual {v9, v4}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 314
    .end local v3    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 278
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_0
    const-string v9, "msg"

    invoke-virtual {v3, v9}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_1

    .line 279
    const/4 v9, 0x2

    iput v9, v4, Landroid/os/Message;->arg1:I

    .line 280
    sget-object v9, Lframent/FramentMerchant;->h:Landroid/os/Handler;

    invoke-virtual {v9, v4}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 306
    .end local v3    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 308
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 311
    iput v12, v4, Landroid/os/Message;->arg1:I

    .line 312
    sget-object v9, Lframent/FramentMerchant;->h:Landroid/os/Handler;

    invoke-virtual {v9, v4}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 283
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v9, "msg"

    invoke-virtual {v3, v9}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v5

    .line 284
    .local v5, "obj":Lorg/json/JSONObject;
    const-string v9, "shopRealInfo"

    invoke-virtual {v5, v9}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v6

    .line 285
    .local v6, "shopinfo":Lorg/json/JSONArray;
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    new-instance v10, Ljava/util/ArrayList;

    invoke-direct {v10}, Ljava/util/ArrayList;-><init>()V

    iput-object v10, v9, Lframent/FramentMerchant;->ilistcx:Ljava/util/List;

    .line 286
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    new-instance v10, Ljava/util/ArrayList;

    invoke-direct {v10}, Ljava/util/ArrayList;-><init>()V

    iput-object v10, v9, Lframent/FramentMerchant;->imgid:Ljava/util/List;

    .line 287
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    invoke-virtual {v6}, Lorg/json/JSONArray;->length()I

    move-result v9

    if-lt v1, v9, :cond_2

    .line 302
    iput-object v7, v4, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 304
    const/4 v9, 0x3

    iput v9, v4, Landroid/os/Message;->arg1:I

    .line 305
    sget-object v9, Lframent/FramentMerchant;->h:Landroid/os/Handler;

    invoke-virtual {v9, v4}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 288
    :cond_2
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    new-instance v10, Lbean/Imagetype;

    invoke-direct {v10}, Lbean/Imagetype;-><init>()V

    iput-object v10, v9, Lframent/FramentMerchant;->isb:Lbean/Imagetype;

    .line 290
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v9, v9, Lframent/FramentMerchant;->isb:Lbean/Imagetype;

    invoke-virtual {v6, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v10

    const-string v11, "name"

    invoke-virtual {v10, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Lbean/Imagetype;->setName(Ljava/lang/String;)V

    .line 291
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v9, v9, Lframent/FramentMerchant;->isb:Lbean/Imagetype;

    invoke-virtual {v6, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v10

    const-string v11, "imgcount"

    invoke-virtual {v10, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Lbean/Imagetype;->setCount(Ljava/lang/String;)V

    .line 292
    invoke-virtual {v6, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v9

    const-string v10, "imglist"

    invoke-virtual {v9, v10}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v2

    .line 294
    .local v2, "imgs":Lorg/json/JSONArray;
    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v9

    if-lez v9, :cond_3

    .line 295
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v9, v9, Lframent/FramentMerchant;->isb:Lbean/Imagetype;

    const/4 v10, 0x0

    invoke-virtual {v2, v10}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v10

    const-string v11, "img"

    invoke-virtual {v10, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Lbean/Imagetype;->setImg(Ljava/lang/String;)V

    .line 296
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v9, v9, Lframent/FramentMerchant;->imgid:Ljava/util/List;

    const/4 v10, 0x0

    invoke-virtual {v2, v10}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v10

    const-string v11, "id"

    invoke-virtual {v10, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-interface {v9, v10}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 297
    iget-object v9, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v9, v9, Lframent/FramentMerchant;->ilistcx:Ljava/util/List;

    iget-object v10, p0, Lframent/FramentMerchant$2;->this$0:Lframent/FramentMerchant;

    iget-object v10, v10, Lframent/FramentMerchant;->isb:Lbean/Imagetype;

    invoke-interface {v9, v10}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 287
    :cond_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 317
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 318
    monitor-exit p0

    return-void

    .line 317
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
